<%@page import="com.cmti.commons.web.AuthenticationFilter"%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@taglib prefix="spring" uri="http://www.springframework.org/tags" %>
<!DOCTYPE html>
<%
    pageContext.setAttribute("contextPath", request.getContextPath());
    pageContext.setAttribute("loginUser", session.getAttribute(AuthenticationFilter.AUTH_INFO));
%>
<html>
    <head>
        <%@include file="/WEB-INF/jspf/top_easyui.jspf" %>
        <title>管理系统</title>
        <style>
            .panel-body{
                overflow: hidden;
            }
        </style>
        <script type="text/javascript">
            $(document).ready(function () {
                $.ajax({
                    url: '${contextPath}/navMenu.json',
                    success: function (rs) {
//                        $('#navMenu').tree({
//                            data: rs.navMenu, lines: true,
//                            onClick: function (node) {
//                                var url;
//                                if (node.attributes) {
//                                    url = node.attributes.url;
//                                }
//                                if (url)
//                                    addTab(node.text, "${contextPath}" + url, 'frame' + node.id);
//                            },
//                            filter: function (q, node) {
//                                if (node.id === 54 || node.id === 55)
//                                    return false;
//                                else
//                                    return true;
//                            }
//                        });
//                        $('#navMenu').tree('doFilter');
                        $('#navMenu').sidemenu({
                            data: rs.navMenu, border:false, 
                            onSelect: function (node) {
                                var url;
                                if (node.attributes) {
                                    url = node.attributes.url;
                                }
                                if (url)
                                    addTab(node.text, "${contextPath}" + url, 'frame' + node.id);
                            }
                        });
                    }
                });
                $('#sltUI').combobox({
                    panelHeight: 'auto', editable: false, width:108,
                    onChange: function (newValue, oldValue) {
                        if (newValue != '${theme}')
                        location.href = "${contextPath}/main?theme=" + newValue;
                    }
                }).combobox('select', '${theme}');

            });
        </script>
    </head>
    <body class="easyui-layout">
        <%@include file="/WEB-INF/jspf/top_banner.jspf" %>

        <div region="west" data-options="split:false,title:'导航菜单',iconCls:'icon-nav',border:true" style="width: 200px; overflow-y: auto;">
            <!--            <div class="easyui-accordion" data-options="fit:true,border:false">
                            <div title="系统管理">
                                <a href="javascript:addTab('用户管理','','userManagement');">用户管理</a><br>
                                <a href="">权限管理</a><br>
                                <a href="">组织架构管理</a>
                            </div>
                            <div title="基础数据管理"></div>
                        </div>-->
            <!--<ul id="navMenu"></ul>-->
            <div id="navMenu"></div>
            <!--            <ul class="easyui-tree" data-options="lines:true">
                            <li>
                                <span>XXXX系统</span>
                                <ul>
                                    <li>
                                        <span>系统管理</span>
                                        <ul>
                                            <li><span><a href="javascript:addTab('角色权限管理','${contextPath}/student','roleManagement');">角色权限管理</a></span></li>
                                            <li><span><a href="javascript:addTab('用户管理','','userManagement');">用户管理</a></span></li>
                                            <li><span><a href="javascript:addTab('组织架构管理','','deptManagement');">组织架构管理</a></span></li>
                                        </ul>
                                    </li>
                                </ul>
                            </li>
                            <li>
                                <span>基础数据管理</span>
                            </li>
                        </ul> -->
        </div>
        <div id="mainPanle" region="center" style="" border="true" >
            <div id="tabs" class="easyui-tabs" fit="true" border="false" >
                <div title="首页" id="home" data-options="iconCls:'icon-house'">
                    <!--<h2>欢迎使用管理系统</h2>-->
                    <%-- <iframe scrolling="auto" frameborder="0" style="width:100%;height:100%;" src="${contextPath}/student" name="fhome"></iframe> --%>
                    <div class="easyui-layout" data-options="fit:true">  
                        <div data-options="region:'center',title:'管理流程',border:false">
                            <div style="padding-left:80px;">
                                <img src="${contextPath}/resources/images/use_map.png" usemap="#planetmap" style="border:0;" />
                                <map name="planetmap">
                                    <area href="#" shape="rect" coords="42,23,156,138" title="客户信息管理"  />
                                    <area href="#"  shape="rect" coords="42,190,156,306" title="销售信息管理" />
                                    <area href="#"  shape="rect" coords="42,357,156,473" title="二手机信息管理" />
                                    <area href="#"  shape="rect" coords="244,191,358,305" title="债权明细查询" />
                                    <area href="#"  shape="rect" coords="440,191,553,305" title="还款" />
                                </map>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>   
        <div region="south" class="footer-color" style="height: 35px;" border="false">
            <div style="width:100%;position: relative">
                <div class="powered">
                    <span>© 2012-2013 Powered by <a href="http://www.haonengzhao.com" target="_black">CMTI</a></span>
                    <span><a href="http://www.haonengzhao.com" target="_black">福州云动科技版权所有</a></span>
                    <!--<span>技术支持：18950295137</span>-->
                </div>
                <div class="style-select">
                    <!--<span class="text">界面风格</span>-->
                    <div class="style-select-option">
                        <select id="sltUI">
                            <option value="default">经典蓝</option>
                            <option value="black">深邃黑</option>
                            <option value="gray">典雅灰</option>
                            <option value="bootstrap">Bootstrap</option>
                            <option value="metro" >Metro</option>
                            <option value="material" >Material</option>
                            <option value="material-teal" >Material Teal</option>
                        </select>
                    </div>
                </div>
            </div>
        </div>

    </body>
</html>
